﻿using Furion;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Queer.Cache;
using Queer.Entity;
using System;

namespace Queer.EntityListener.SystemManage
{
    public class MenuAuthorizeListener : IEntityChangedListener<MenuAuthorizeEntity>
    {

        public void OnChanged(MenuAuthorizeEntity newEntity, MenuAuthorizeEntity oldEntity, DbContext dbContext, Type dbContextLocator, EntityState state)
        {
            App.GetService<MenuAuthorizeCache>().Remove();
        }
    }
}